<?php
// +----------------------------------------------------------------------
// | 系统目录结构生成
// +----------------------------------------------------------------------
// | TP_Blog
// +----------------------------------------------------------------------

$modules       = ['Posts', 'Categorys', 'Tags', 'Files', 'Links', 'Guests', 'Comments', 'Permission', 'Roles', 'UserBase'];
$_modulesFiles = ['logic', 'service', 'model'];

foreach ($_modulesFiles as $file) {
    foreach ($modules as $module) {
        $commonDir[$file][] = $module . ucfirst($file);
    }
}

return [
    'admin'  => [
        '__dir__'    => ['controller', 'view'],
        'controller' => $modules,
    ],

    'index'  => [
        '__dir__'    => ['controller', 'view'],
        'controller' => ['Index', 'Guests'],
    ],

    'common' => [
        '__dir__'    => ['controller', 'validate', 'model', 'logic', 'service'],
        'controller' => ['AdminBase', 'HomeBase'],
        'logic'      => $commonDir['logic'],
        'service'    => $commonDir['service'],
        'model'      => $commonDir['model'],
    ],
];
